/*
 * @Date: 2024-04-02 14:58:12
 * @LastEditors: bingkui.wu
 * @LastEditTime: 2024-04-02 15:56:26
 * @Description: 单元
 */
import mongoose, { Schema, Model, Document } from "mongoose";

export interface IBookUnit extends Document {
    /** 教材Id */
    categoryId: number,
    /** 年级Id */
    gradeId: number
    /** 单元Id */
    unitId: number;
    /** 单元名字 */
    unitName: string;
}

export interface IBookUnitModel extends Model<IBookUnit> {}

const schema = new Schema({
    categoryId: Number,
    gradeId: Number,
    unitId: Number,
    unitName: String,
});

export const BookUnit = mongoose.model<IBookUnit>("book_unit", schema) as IBookUnitModel;
